package chapter5;
import java.util.Scanner;
/****************************************************************
 * Author：icynlau
 * Description: 财务应用程序 求出销售总额
 * Date:2021/4/4
 * ***************************************************************
 */
public class exc5_42 {
	public static void main(String[] args) {
		Scanner input=new Scanner(System.in);
		System.out.print("Enter you COMMISSION_SOUGHT: ");
		final double COMMISSION_SOUGHT=input.nextDouble();
		double sell=0;
		double earn=5000;//别忘了基本工资5000
		do {
			sell++;
			if(sell>0.01&&sell<=5000) {
				earn+=0.08;
			}else if(sell>5000&&sell<=10000) {
				earn+=0.1;
			}else {
				earn+=0.12;
			}
		}while(earn<COMMISSION_SOUGHT);

		
		System.out.print("You must sell $"+sell+" at least.");
	}

}
